home *** CD-ROM | disk | FTP | other *** search
/ Game Cracker (Expanded Edition) / Game Cracker (Expanded Edition).iso / cracks / SWRUSH.ZIP / CRACKER.PAS < prev    next >
Pascal/Delphi Source File  |  1998-05-22  |  4KB  |  131 lines

  1. { ────────────────────────────────────────────────────────────────────────
  2.                      SHADOW WARRIOR 3DFX PATCHED SEEKER!
  3.                               (c)1998 by Pope-X
  4.  
  5.   Homepage  :   http://huizen.dds.nl/~dbg
  6.   Email     :   dbg@dds.nl
  7.   CopyRight :   U can distribute and use this aslong as u don't ask
  8.                 any money for the programs coded with this source!
  9.   Warrenty  :   I don't Give ANY. if it doesn't work for u then its to bad!
  10.   Note      :   This is NOT illegal!
  11.   ──────────────────────────────────────────────────────────────────────── }
  12.  
  13. { ────────────────────────────────────────────────────────────────────────
  14.   I Have made this because shadowwarrior did not work on a voodoo rush!.
  15.   the basic theory is to replace all JE's with JNE's and all JNE's with
  16.   JE's (assember speaking). offcause these are $74 and $75. so i came up
  17.   with the following program that would patch a $74 and $75 to the oposite
  18.   and then run the program.. this program then always reports "Only Voodoo
  19.   graphics supported". so i searched the screeen for this string. and if
  20.   it was not there then i would dump the intyre screen to a logfile.
  21.   i've runned the program.. and when i woke up.. shadow warrior was
  22.   RUNNING!.. i quited.. looked into my logfile and yes there it was on the
  23.   position 1350385.. it had runned sw already for about 10.000 times..!
  24.   WOW!!!!!! ohwel..! now it works! voodoo rush rules the world! and
  25.   shame on the 3dfx compagny for not making it work in the firstplace..
  26.   because it runs pritty smoooth on my rush!
  27.  
  28.   oh there is one sideeffect!.. once patched.. it doesnt work on a 3dfx!
  29.   ──────────────────────────────────────────────────────────────────────── }
  30. uses dos,crt,rafdradd;
  31. const letter:array[1..3,0..10] of string[7]=(
  32. ('┌╦═══╦┐',' ═╦┐ ','┌════╦┐',' ═══╦┐','┌╗  ╔╕ ','┌╦═══─ ','┌╦═══╦┐','┌════╦┐',' ┌╦═╦┐ ','┌╦═══╦┐','   '),
  33. ('│║ Θ ║│','  ║│ ','┌╔═══╝┘','  ══╬┐','└╩═╤╬╤╛','└╩═══╦┐','├╠═══╗┐','   ╔╤╝┘','┌╔╩═╩╗┐','└╩═══╬┤','   '),
  34. ('└╩═══╩┘','  ╩┘ ','└╚════┘','╘═══╩┘','   └╩┘ ','└╩═══╩┘','└╩═══╩┘','   ╝┘  ','└╩═══╩┘','└╩═══╩┘','└╝ '));
  35.  
  36. procedure showpos(st:string;p:integer);
  37. var y,x:longint;
  38.     tmpstr:string;
  39. begin
  40.      st:=comastr(st,3,'.');
  41.      for y:=1 to 3 do
  42.         begin
  43.           tmpstr:='';
  44.           for x:=1 to length(st) do
  45.             case st[x] of
  46.               '0'..'9' :tmpstr:=tmpstr+(letter[y,str2int(st[x])]);
  47.               '.'      :tmpstr:=tmpstr+(letter[y,10]);
  48.               end;
  49.            colorwrite(1,p+y,15,0,max('',15)+max(tmpstr,80-15));
  50.         end;
  51. end;
  52.  
  53. function getmemstring(regel:integer):string;
  54. var s:string;
  55.     x:longint;
  56. begin
  57.    s:='';
  58.    for x:=0 to 78 do addstr(s,char(mem[$b800:(regel*160)+(x*2)]));
  59.    getmemstring:=s;
  60. end;
  61.  
  62. var f:file of byte;
  63.     c,d,z:byte;
  64.     times:longint;
  65.     poz:longint;
  66.     starter:file of longint;
  67.     startpos:longint;
  68.     t:text;
  69. begin
  70.    filemode:=fmreadwrite+fmdenynone;
  71.    clrscr;
  72.    {$I-}
  73.    assign(starter,'starter.dat');
  74.    Reset(starter);
  75.    read(starter,startpos);
  76.    read(starter,times);
  77.    close(starter);
  78.    {$I+}
  79.    if ioresult<>0 then
  80.     begin
  81.      startpos:=230000; {SIZE OF DOS4GW!}
  82.      times:=0;
  83.     end;
  84.  
  85.    assign(f,'sw3dfx.exe');
  86.    reset(f);
  87.    seek(f,startpos);
  88.    repeat
  89.      read(f,c);
  90.      if c in [$75,$74] then
  91.        begin
  92.          inc(times);
  93.          poz:=filepos(f);
  94.          seek(f,poz-1);
  95.          case c of
  96.            $75:d:=$74;
  97.            $74:d:=$75;
  98.          end;
  99.          Write(f,d);
  100.          Close(f);
  101.  
  102.          rewrite(starter);
  103.          startpos:=poz+1;
  104.          write(starter,startpos);
  105.          write(starter,times);
  106.          close(starter);
  107.  
  108.          clrscr;
  109.          showpos(int2str(poz),13);
  110.          showpos(int2str(times),19);
  111.          Exec('sw3dfx.exe');
  112.          showpos(int2str(poz),13);
  113.          showpos(int2str(times),19);
  114.          if (pos('Only Voodoo',getmemstring(0))=0) then
  115.             begin
  116.                {$I-}
  117.                assign(t,'Debug.log');
  118.                append(t);
  119.                {$I+} if ioresult<>0 then Rewrite(t);
  120.                Writeln(t,max('───<'+int2str(poz)+'>'+makestr('─',70),79));
  121.                for z:=0 to 24 do Writeln(t,getmemstring(z));
  122.                close(t);
  123.             end;
  124.          reset(f);
  125.          seek(f,poz-1);
  126.          Write(f,c);
  127.        end;
  128.    until eof(f) or keypressed;
  129.  
  130.    close(f);
  131. end.